const { get_modules_of_dir } = require("../utils");

module.exports = {
  service: {},
  async register() {
    const dir = `${__dirname}/modules`;
    const services = await get_modules_of_dir(dir, ".service.js");
    services.forEach((service) => {
      this.service[service.name] = service;
    });
  },
};
